<?php
/**
* @author Bimal Poudel
* @copyright since 2006, Bimal Poudel
* @package Smarty Framework
* @support http://www.odesk.com/users/~~dd91d11caed0cdce
* @contact http://www.sanjaal.com
* @company Sanjaal Corps
*/

# Created on: 2011-03-26 02:03:16 265

/**
* Details of an entry in [ users ]
*/

$user_id = $variable->get('id', 'integer', 0); # Entity ID
$code = $variable->get('code', 'string', ''); # Protection Code

if(!$user_id)
{
	# Page was loaded without the ID parementer
	stopper::url('users-direct-access-error.php?context=identity');
}
else
{
	$users = new users();
	
	# Try to load the details
	if($users_details = $users->details($user_id, $code))
	{
		# We aim to reach here only.
		$smarty->assignByRef('users', $users_details);
	}
	else
	{
		# Record not found
		stopper::url('users-direct-access-error.php?context=data');
	}
}
?>